﻿//-----------------------------------------------------------------------
// <copyright file="ServerPackets.cs" company="FastNET Services">
//     Copyright (c) 2008-2009. All Rights Reserved.
// </copyright>
// <license>
//     GPLv2
// </license>
// <warranty>
//     THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING
//     BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
//     NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM,
//     DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
//     OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
// </warranty>
//-----------------------------------------------------------------------
#region Usings

using System;
using System.Runtime.InteropServices;

#endregion

namespace GateShift.Common.DataPackets.Player
{
    /// <summary>
    /// DataPacket used to send a player's data to the server
    /// </summary>
    [StructLayout(LayoutKind.Sequential, CharSet = CharSet.Unicode)]
    [Serializable]
    public struct ServerPlayerPositionPacket : IDataPacket
    {
        /// <summary>
        /// The rotational position of the player
        /// </summary>
        public float Rotation;

        /// <summary>
        /// The X-Axis of the player
        /// </summary>
        public float AxisX;

        /// <summary>
        /// The Y-Axis of the player
        /// </summary>
        public float AxisY;

        /// <summary>
        /// The Z-Axis of the player
        /// </summary>
        public float AxisZ;
    }

    /// <summary>
    /// DataPacket used to send a player's state to the server
    /// </summary>
    [StructLayout(LayoutKind.Sequential, CharSet = CharSet.Unicode)]
    [Serializable]
    public struct ServerPlayerStateChangePacket : IDataPacket
    {
        /// <summary>
        /// The state of the player
        /// </summary>
        public short NewState;
    }
}